<template>
    <div>
        <Form :label-width="130" inline>
            <Form-item label="属地区划:">
                <area-linkage :areaCode.sync="queryParam.areaCode" :communityDisable="true" id="area"></area-linkage>
            </Form-item>
            <Form-item label="更新确认日期：">
                <Date-picker v-model="queryParam.time" format="yyyy/MM/dd" type="daterange" placement="bottom-end"
                             placeholder="选择日期" style="width: 200px"></Date-picker>
            </Form-item>
            <Form-item label="未更新天数：">
                <Select style="width:150px" placeholder="请选择天数" v-model="queryParam.unUpdateDay">
                    <Option value="30">1个月</Option>
                    <Option value="90">3个月</Option>
                    <Option value="180">6个月</Option>
                    <Option value="365">12个月</Option>
                </Select>
            </Form-item>
        </Form>
        <Row class="button_row">
            <span style="float: right;margin-right: 8px">
                 <Button type="primary" @click="searchQueryThis">查询</Button>
                 <Button type="primary" class="button_item_left" @click="searchReset">重置</Button>
            </span>
        </Row>
        <div class="table_div">
            <Table :columns="columns" :data="tableData" :loading="Loading">

            </Table>
            <Page :total="dataCount" :page-size="pageSize" show-total class="paging"
                  @on-change="handleTableChange" :current="pageNo"></Page>
        </div>
    </div>

</template>
<script>
    import {CommonMixin} from '@/views/common/js/CommonMixin'

    import DateFormat from '@/plugins/format'

    export default {
        mixins: [CommonMixin],
        components: {},
        data() {
            return {
                columns: [
                    {
                        title: '市',
                        key: 'azaa0110'
                    },
                    {
                        title: '区县',
                        key: 'azaa0111',
                    },

                    {
                        title: '乡镇（街道）',
                        key: 'azaa0112',
                    },
                    {
                        title: '经办人数',
                        key: 'tacp0004Count'
                    },
                    {
                        title: '经办人近亲属人数',
                        key: 'count',
                    },
                    {
                        title: '更新确认时间',
                        key: 'date',
                        render: function (h, params) {
                            return h('span', DateFormat(params.row.date, 'YYYY-MM-DD'));
                        }
                    },
                    {
                        title: '未更新天数',
                        key: 'unUpdateDay'
                    },
                ],
                ss02100: {},
                queryParam: {},
                tacp0016List: {},
                Loading: true,
                determine: false,
                url: {
                    list: "/api/ac/subsistence/Ss02100Service/statistical",
                },
            }
        },
        methods: {
            searchQueryThis() {
                var time = this.queryParam.time;
                if (time) {
                    this.queryParam.beginDate = DateFormat(time[0], 'YYYY-MM-DD');
                    this.queryParam.endDate = DateFormat(time[1], 'YYYY-MM-DD');
                }
                this.loadData();
            }
        },
        created() {
            this.loadData();
        },
    }
</script>
<style scoped>
    .paging {
        float: right;
        margin-top: 10px;
    }

    /deep/ .ivu-upload-list {
        display: none;
    }

    /deep/ .ivu-table-cell {
        padding-right: 0px;

    }

    /deep/ #area .ivu-col-span-8 {
        width: 50%;
    }

    #area :nth-child(3) {
        display: none;
    }
</style>